package com.mentaleye.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mentaleye.dal.dao.AttendanceExceptionDao;
import com.mentaleye.dal.model.AttendanceException;
import com.mentaleye.dal.model.AttendanceExceptionExample;
import com.mentaleye.dal.model.AttendanceExceptionExample.Criteria;
import com.mentaleye.service.AttendanceExceptionService;

@Service
public class AttendanceExceptionServiceImpl implements AttendanceExceptionService {

	@Autowired private AttendanceExceptionDao dataDao;
	
	@Override
	public List<AttendanceException> getList() {
		AttendanceExceptionExample example=new AttendanceExceptionExample();
		return this.dataDao.getListByExample(example);
	}

	@Override
	public List<AttendanceException> getListByDiscipline() {
		AttendanceExceptionExample example=new AttendanceExceptionExample();
		Criteria criteria = example.createCriteria();
		criteria.andIsDisciplineEqualTo(true);
		return this.dataDao.getListByExample(example);
	}

}
